package com.hk.core.data.jpa.annotations;


import org.hibernate.annotations.IdGeneratorType;
import org.hibernate.id.SnowflakeIdentifierGenerator;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;


/**
 * 雪花算法id 生成器
 */
@Retention(RUNTIME)
@Target({FIELD, METHOD})
@IdGeneratorType(value = SnowflakeIdentifierGenerator.class)
public @interface SnowflakeIdGenerator {

}
